#include <cstdio>
#include <cstring>
using namespace std;

int StrDivide2(char[]);
bool StrIsZero(char[]);
void InverseStr(char[]);

int main()
{
    char num[100] = {0};
    while (scanf("%s", num) != EOF) {
        int pos = 0;
        char ans[120] = {0};
        do {
            ans[pos++] = StrDivide2(num) + '0';
        } while (!StrIsZero(num));

        InverseStr(ans);
        printf("%s\n", ans);
    }
    
}

int StrDivide2(char num[])
{
    int len = strlen(num), remainder = 0, temp_value;
    
    for (int i = 0; i < len; i++) {
        temp_value = (num[i] - '0' + remainder * 10) / 2;
        remainder = (num[i] - '0') % 2;
        num[i] = temp_value + '0';
    }
    return remainder;
}

bool StrIsZero(char num[])
{
    int len = strlen(num);
    for (int i = 0; i < len; i++)
        if (num[i] != '0')
            return false;
    return true;
}

void InverseStr(char num[])
{
    int low = 0, high = strlen(num) - 1, temp;
    for (; low < high; low++, high--) {
        temp = num[low];
        num[low] = num[high];
        num[high] = temp;
    }
}